home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2697 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.9 KB  |  43 lines

  1. Newsgroups: comp.lang.c++,comp.protocols.tcp-ip
  2. Path: in1.uu.net!etnibsd!sandeep
  3. From: sandeep@etnibsd.uucp (Sandeep Pathak)
  4. Subject: Re: Socket classes and fork()
  5. Message-ID: <1996Jan18.172828.2549@etnibsd.uucp>
  6. Keywords: sockets, C++, fork
  7. Reply-To: sandeep%etnibsd@uunet.uu.net
  8. Organization: Eaton Ion Beam Systems Div., Beverly, MA
  9. References: <1996Jan15.192235.21245@etnibsd.uucp> <dlbzgv.fkn@inka.de>
  10. Date: Thu, 18 Jan 1996 17:28:28 GMT
  11.  
  12. In article <dlbzgv.fkn@inka.de> olaf@inka.de (Olaf Titz) writes:
  13. >Sandeep Pathak <sandeep%etnibsd@uunet.uu.net> wrote:
  14. >> My Socket class also has a reference count similar to that maintained 
  15. >> by the kernel for a socket descriptor. But how do I maintain this count
  16. >> if a fork() is done? I can not think of anyway of maintaining 
  17. >> consistency w/ the kernel count unless there is some parent <-> child 
  18. >> IPC for the Socket object. Anybody want to share some experiences?..
  19. >
  20. >Encapsulate every fork() you use in a routine that does this housekeeping.
  21. >
  22. >olaf
  23.  
  24. I have seen a Fork wrapper in "sockets++-1.x". I guess I need to look at it 
  25. further..but I am still confused about maintaining consistency amongst objects
  26. after a fork(), (unless I check for SIGCHLD signal??). Someone suggested
  27. use of threads so we have the same process space then. I guess thats the way
  28. to go..but I just cannot invest that much time now.
  29. Any other ideas besides threads (shared memory..i guess..).
  30. I will post the responses I got thru email as a collective reply.
  31.  
  32. thanks for all your input, folks!
  33.  
  34. -sandeep
  35. -----------------------------------------------------------------
  36. Sandeep Pathak                  ! secs:  (508)921-9696 
  37. Eaton Corporation               ! mins:  (508)927-3652
  38. Semiconductor Equipment Div.    ! hrs :  spathak@bev.etn.com
  39. "Whatever u can do or dream u   ! days:     108 Cherry Hill Drive
  40. can do..begin it" -- Goethe     !        Beverly  MA 01915
  41. -----------------------------------------------------------------
  42.  
  43.